
<%@page import="servlet.AppttypeDropdown"%>
<%@page import="servlet.StaffappStaffDropdown"%>
<%@page import="Logic.Authorizer"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%
	if (session.getAttribute("name") == null) {
		response.sendRedirect("login.jsp");
	} else {
		if (Authorizer.checkRole("1", session.getAttribute("role")
				.toString()) || Authorizer.checkRole("3", session.getAttribute("role").toString()) || (session
						.getAttribute("role").equals("2"))) {

		}
		else
		{
			response.sendRedirect("nopermission.jsp");
						
		}
	}
%>


<!-- Declare the first header -->
<jsp:include page="t_header.jsp" />


<jsp:include page="header.html" />
<!-- Declare sidebar -->
<jsp:include page="t_siderbarcommittee.jsp" />

<!-- Main Content -->
<section id="main" class="column">
	<%
		if (request.getParameter("error") != null) {
			if (request.getParameter("error").equals("1"))
				out.print("<h4 class='alert_error'>Error - Please fill in all fields.</h4>");
			else if (request.getParameter("error").equals("2"))
				out.print("<h4 class='alert_error'>Error - Title taken. Please choose a different title.</h4>");
			else if (request.getParameter("error").equals("-1"))
				out.print("<h4 class='alert_success'>Staffs assigned to Committee Successfully.</h4>");
		}
	%>

	<article class="module width_3_quarter">
		<form action="CommitteeNew" method="POST">
			<header>
				<h3>NEW COMMITTEE</h3>
			</header>
			<div class="module_content">
				<fieldset>
					<label>Title</label> 
					<input type="text" maxlength="70" name="title"
					value="<%if(request.getAttribute("title") != null){
					out.println(request.getAttribute("title"));
					}%>">
				</fieldset>
				<fieldset>
					<label>Purpose</label> <input type="text" maxlength="300"
						name="purpose"
						value="<%if(request.getAttribute("purpose") != null){
					out.println(request.getAttribute("purpose"));
					}%>">
				</fieldset>
				<fieldset>
					<label>Roles & Responsibilities</label>
					<textarea rows="5" name="r&r"><%
					if(request.getAttribute("r&r") != null){
					out.println(request.getAttribute("r&r"));
					}%></textarea>
				</fieldset>
				<fieldset>
					<label>Effective Date</label> <input name="effectivedate"
						type="text" id="inputField" readonly="readonly"
						value="<%if(request.getAttribute("effectivedate") != null){
					out.println(request.getAttribute("effectivedate"));
					}%>" />
				</fieldset>
				<fieldset>
					<label>Frequency of meeting - Optional</label> <input type="text"
						maxlength="70" name="fom" 
						value="<%if(request.getAttribute("fom") != null){
					out.println(request.getAttribute("fom"));
					}%>">
				</fieldset>
			</div>
			<footer>
				<div class="submit_link">
					<input type="submit" value="Next" class="alt_btn">
				</div>
			</footer>
		</form>
	</article>
	<div class="spacer"></div>
</section>

<!-- Declare closing tags -->
<jsp:include page="t_footer.jsp" />
